export const constantRoute = [
	{
		// 根路径重定向到登录页面
		path: '/',
		redirect: '/login',
		meta: {
			hidden: true
		}
	},
	{
		// 登录路由
		path: '/login',
		name: 'login',
		component: () => import('../views/login/index.vue'),
		meta: {
			title: '登录',
			hidden: true
		}
	},
	{
		//登录成功以后展示数据的路由
		path: '/home',
		component: () => import('../views/home/index.vue'),
		name: 'layout',
		meta: {
			title: '',
			hidden: false,
			icon: ''
		},
		redirect: '/welcome',
		children: [
			{
				path: '/welcome',
				component: () => import('../views/alc/welcome/index.vue'),
				meta: {
					title: '首页',
					hidden: false
				}
			}
		]
	},
	{
		// 个人首页
		path: '/homePage',
		name: 'homePage',
		component: () => import('../views/user/homePage.vue'),
		meta: {
			title: '系统首页',
			hidden: true
		}
	},
	{
		// 404页面
		path: '/404',
		name: '404',
		component: () => import('@/views/404/index.vue'),
		meta: {
			title: '404',
			hidden: true
		}
	},
	{
		// 笔试
		path: '/writtenTest',
		name: 'writtenTest',
		component: () => import('../views/test/writtenTest/index.vue'),
		meta: {
			title: 'writtenTest',
			hidden: true
		}
	}
]
export const asnycRoute = [
	{
		path: '/manage',
		name: 'manage',
		component: () => import('../views/home/index.vue'),
		redirect: '/manage/manageUser',
		meta: {
			title: '权限管理',
			icon: 'Lock'
		},
		children: [
			{
				path: '/manage/manageUser',
				name: 'manageUser',
				component: () =>
					import('../views/alc/manage/manageUser.vue'),
				meta: {
					title: '用户管理'
				}
			}
		]
	},
	{
		path: '/quiz',
		name: 'quiz',
		component: () => import('../views/home/index.vue'),
		redirect: '/quiz/index',
		meta: {
			title: '能力测试',
			icon: 'Lock'
		},
		children: [
			{
				path: '/quiz/index',
				name: 'quizIndex',
				component: () => import('../views/alc/quiz/index.vue'),
				meta: {
					title: '笔试'
				}
			},
			{
				path: '/quiz/manage',
				name: 'quizManage',
				component: () =>
					import('../views/alc/quiz/manageQuestions.vue'),
				meta: {
					title: '题库管理'
				}
			},
			{
				path: '/quiz/history',
				name: 'quizHistory',
				component: () =>
					import('../views/alc/examHistory/index.vue'),
				meta: {
					title: '考试记录查询'
				}
			},{
				path: '/quiz/historyByUserId',
				name: 'myQuizHistory',
				component: () =>
					import('../views/alc/examHistory/historyByUserId.vue'),
				meta: {
					title: '我的考试记录查询'
				}
			}
		]
	}
]
export const anyRoute = {
	//任意路由
	path: '/:pathMatch(.*)*',
	redirect: '/404',
	name: 'Any',
	meta: {
		title: '重定向',
		hidden: true
	}
}
